package com.xt.pro;



public class BLEControlJni
{
    static {
        System.loadLibrary("BLEControl_jni");
    }



    public native static boolean init(Object delegateObject, byte[] logPath,
                                      int length);

    public native static boolean isXTDevice(byte[] recordData, int dataLen);

    // blu recv,true-success, false-fail
    public native static boolean AnalysisResult(byte[] recordData, int dataLen);
    public native static byte[] AnalysisResult2(byte[] recordData, int dataLen);

    // get bscy
    public native static int[] GetBSCYData(byte[] bscyData, int dataLen, int zoomMultiples, int pw, int ph);

    // made del flash order
    //public native static byte[] GetDelFlashOrder(int len);


    public native static byte[] GetDelFlashOrderIdentity(int len, byte []identityInfo, int identityLen);

    public native static byte[] GetDelFlashOrder2(int len1, int len2, int len3);

    // type=0old pro, type=1newpro
    public native static byte[] GetDownloadStateOrder(int type);
    // type=0old pro, type=1newpro
    public native static byte[] GetPageDataOrder(int type, byte[] data, int dataLen, int index, int count);

    // type:0pic,1msg,2ota,3pic2(value:1A,2B,3AB)
    public native static byte[] GetUpdateOrder(int type, int value);
    public native static byte[] GetUpdateOrderIdentity(int type, int value, byte []identityInfo, int identityLen);
    public native static byte[] GetPicUpdateOrderWithParams2(byte []params, int paramsLen);
    // form ble record get tag info
    public native static BleTagInfo GetTagDeviceInfo(byte[] data, int dataLen);

    public native static BleNFCBindInfo GetBleNFCBindInfo(byte[] data, int dataLen);

    public native static byte[] GetLEDOrder(int colorType, int color, int duration);
    public native static byte[] GetPrismOrder(int colorType);

    public native static byte[] GetPicStorageCapacityOrder(int type, int value);

    //
    public native static int[] PicDither(int []srcData, int picW, int picH, int colorType, int useCoefficient, int coefficient1, int coefficient2, int coefficient3, int coefficient4);
    public native static int[] PicDither2(int []srcData,
                                          int[]jlData, int zoomLen,
                                          int picW, int picH,
                                          int colorType,
                                          int ditherType,
                                          int deviceNumber);
    public native static int[] PicDither3(int []srcData,
                                          int picW, int picH,
                                          int colorType,
                                          int ditherType);
    public native static int[] PicDither4(int []srcData,
                                          int picW, int picH,
                                          int colorType,
                                          int ditherType);
    public native static int[] PicDither6(int []srcData,
                                          int picW, int picH,
                                          int colorType,
                                          int ditherType);
    public native static int[] PicDither7(int []srcData,
                                          int picW, int picH,
                                          int colorType,
                                          int ditherType);
    public native static int[] PicDither8(int []srcData,
                                          int picW, int picH,
                                          int colorType,
                                          int ditherType);

    public native static int[] PicDither9(int []srcData,
                                          int picW, int picH,
                                          int colorType,
                                          int ditherType,
                                          int r_b, int g_b, int b_b,
                                          int r_w, int g_w, int b_w,
                                          int r_r, int g_r, int b_r,
                                          int r_g, int g_g, int b_g,
                                          int r_blue, int g_blue, int b_blue,
                                          int r_y, int g_y, int b_y,
                                          int r_o, int g_o, int b_0,
                                          int baseRGB, int bright,
                                          int pointCount);

    public native static int[] PicDither5(int []srcData,
                                          int brightMaxR, int brightMaxG, int brightMaxB,
                                          int picW, int picH,
                                          int colorType,
                                          int ditherType,
                                          int deviceNumber);

    public native static int[] GetPicData(int picSize,
                                          int []srcBitmapData, int bufferLen, int picW, int picH, int colorType, int black_white_contrary, int mirrorHorizontally, int mirrorVertical,
                                          int []srcBitmapData_2, int bufferLen_2, int picW_2, int picH_2, int colorType_2, int black_white_contrary_2, int mirrorHorizontally_2, int mirrorVertical_2);
    public native static int[] GetPicData2(int picSize,
                                          int []srcBitmapData, int bufferLen, int picW, int picH, int colorType, int black_white_contrary, int mirrorHorizontally, int mirrorVertical,
                                          int []srcBitmapData_2, int bufferLen_2, int picW_2, int picH_2, int colorType_2, int black_white_contrary_2, int mirrorHorizontally_2, int mirrorVertical_2,
                                           int compressType);

    // getdeviceorder 1write,2read
    public native static byte[] GetTagDeviceInfoOrder(int type);

    public native static byte[] GetNfcOffOrder();
    public native static byte[] GetNfcOffOrderIdentity(byte []identityInfo, int identityLen);

    public native static byte[] GetBroadcastingTypeSwitchOrder(int type);
    public native static byte[] GetWorkModeSwitchOrder(int type);

    public native static int[] GetPicDataKaLeiDo(int []srcBitmapData, int picW, int picH);

    public native static boolean nfcReset();

    public native static byte[] GetFactoryModeOrder(int type);
    public native static byte[] GetSafeModeOrder(int type, byte []info, int infoLen);
    public native static byte[] GetNfcUnLockIdentity(byte []identityInfo, int identityLen);
}
